package org.geeks.gsspringsecurity.biz.domain;

import java.util.Set;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;

import org.geeks.gsspringsecurity.base.domain.BaseDomain;

import lombok.Getter;
import lombok.Setter;

/**
 * 角色
 * 
 * @author Geek-S
 *
 */
@Entity
@Getter
@Setter
public class Role extends BaseDomain {

	private static final long serialVersionUID = 687740659388564656L;

	/**
	 * 角色名
	 */
	private String name;

	/**
	 * 权限
	 */
	@ManyToMany
	@JoinTable(name = "role_authority", joinColumns = { @JoinColumn(name = "role_id") }, inverseJoinColumns = {
			@JoinColumn(name = "authority_id") })
	private Set<Authority> authorities;

	/**
	 * 备注
	 */
	private String memo;
}
